#include <Render/Include/Renderer.h>

using namespace Render;

// ========== LIFECYCLE ========== //

Renderer::~Renderer(void)
{
}

// ========== OVERLODED OPERATORS ========== //

// ========== METHODS ========== //

void Renderer::render3D()
{
    this->render_3D = true;
}

void Renderer::render2D()
{
    this->render_3D = false;
}

void Renderer::addText(std::string text, int pos_x, int pos_y)
{
    TextDataType* text_data = new TextDataType[1];
    text_data->text = text;
    text_data->pos_x = pos_x;
    text_data->pos_y = pos_y;    
    this->text_to_render.push_back(text_data);
}

// ========== GETTERS ========== //

// ========== SETTERS ========== //

// ========== INQUIRY ========== //

// ========== INTERNAL METHODS ========== //
Renderer::Renderer(void)
{
    this->sphere_render_object = NULL;
    this->cube_render_object = NULL;
    this->render_3D = false;
}

void Renderer::clearText()
{
    for (unsigned int i = 0; i < this->text_to_render.size(); i++)
    {
        delete[] this->text_to_render[i]; 
    }
    this->text_to_render.clear();
}

